<style lang="less">
    @import '../../styles/common.less';
</style>
<template>
    <div>
        <Row >
            <Card>
                <p slot="title">
                    车队信息
                </p>
                <Row type="flex" justify="center" align="middle" class="countto-page-row">
	                <Col span="8">车队名称：<span>{{teamsObj.teamName}}</span></Col>
	                <Col span="8">参赛车数：<span>{{teamsObj.automobileQuantity}}</span></Col>
	                <Col span="8">参赛人数：<span>{{teamsObj.matchesNumber}}</span></Col>
	                <Col span="8">是否参加离线测试：
	                	<span v-if="teamsObj.offlineTest==='Y'">参加</span>
                        <span v-if="teamsObj.offlineTest==='N'">不参加</span>
	                </Col>
	                <Col span="16">车队组成单位：<span>{{teamsObj.teamOrganization}}</span></Col>
                </Row>
            </Card>
        </Row>
         <Row class="margin-top-10" :gutter="10" >
            <Col span="6">
                <Card>
                    <p slot="title">
                        负责人信息
                    </p>
                    <Row type="flex" justify="center" align="middle" class="switch-language-row1">
                    	<Col span="24">姓名：{{teamsObj.teamLeader}}</Col>
	                    <Col span="24">性别：
		                    <span v-if="teamsObj.gender===0">男</span>
                            <span v-if="teamsObj.gender===1">女</span>
		                </Col>
	                    <Col span="24">职务/职称：{{teamsObj.duty}}</Col>
	                    <Col span="24">手机：{{teamsObj.teamPhone}}</Col>
	                    <Col span="24">办公电话：{{teamsObj.officePhone}}</Col>
	                    <Col span="24">电子邮箱：</Col>
		                <Col span="24">{{teamsObj.email}}</Col>
                    </Row>
                </Card>
            </Col>
            <Col span="18">
                <Card>
                    <p slot="title">
                        赛车参数信息
                    </p>
                    <Row :gutter="10" type="flex" justify="center" align="middle" class="switch-language-row1">
                        <Col span="8">车长（毫米）：{{teamsObj.automobileLength}}</Col>
		                <Col span="8">车宽（毫米）：{{teamsObj.automobileWidth}}</Col>
		                <Col span="8">车高（毫米）：{{teamsObj.automobileHeight}}</Col>
		                <Col span="8">离去角（度）：{{teamsObj.departureAngle}}</Col>
		                <Col span="8">接近角（度）：{{teamsObj.approachAngle}}</Col>
		                <Col span="8">最小离地间隙（毫米）：{{teamsObj.minGroundClearance}}</Col>
		                <Col span="8">轮距（毫米）：{{teamsObj.wheelTrack}}</Col>
		                <Col span="8">轴距（毫米）：{{teamsObj.wheelBase}}</Col>
		                <Col span="8">最小转弯半径（毫米）：{{teamsObj.minTurningRadius}}</Col>
		                <Col span="8">自主行驶最高车速：{{teamsObj.maxSpeed}}</Col>
		                <Col span="16">自主行驶最低车速：{{teamsObj.minSpeed}}</Col>
		                <Col span="12">
		                	<p><strong>正视图</strong></p>
		                	<img style="width: 80%; cursor: pointer;" :src="getImgPath(teamsObj.frontView)" alt="正视图" >
		                </Col>
		                <Col span="12">
		                	<p><strong>俯视图</strong></p>
		                	<img style="width: 80%; cursor: pointer;" :src="getImgPath(teamsObj.lateralView)" alt="俯视图">
		                </Col>
                    </Row>
                </Card>
            </Col>
        </Row>
        
    </div>
</template>
<script>
import 'jquery';
import {adminId,accessToken} from '../components/date.js';
import {baseurl} from '../../libs/util';

export default {
    
    data () {
    	return {
        	teamId: '',
       		teamsObj: {}
        };
       
    },
    mounted:function(){
		this.team();
	},
    methods: {
    	team : function(){
    		var teamId = this.$route.query.teamId
    		var _self=this;
		  	$.ajax({
	  			url : baseurl+'users/'+adminId+'/teams/'+teamId,
				type : 'get',
				dataType : 'json',
				success : function(data) {
					console.log(data)
					if(data.code == 1){
                        var result = data.result;
                        _self.teamsObj = result;
                    }
				}
	  		});
		},
		getImgPath: function (path) {
            if(!path) return;
            var str = "http://60.205.229.131:8085/mark/showImg?imgPath=" + path;
            return str;
        }
    }
};
</script>